<html  xmlns:th="http://www.thymeleaf.org">
<div id="updateProduct" style="margin-top: 12px;margin-right: 23px;">
    <form class="layui-form" action="/product/update" method="post">
        <input type="hidden" name="id" th:value="${productDo.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">产品名</label>
            <div class="layui-input-block">
                <input type="text" name="productName" th:value="${productDo.productName}" lay-verify="required" autocomplete="off" placeholder="请输入产品名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">单价</label>
            <div class="layui-input-block">
                <input type="text" name="productAmount" onkeyup="this.value=/^\d+\.?\d{0,2}$/.test(this.value) ? this.value : this.value.substring(0,this.value.length-1)"
                       lay-verify="required" th:value="${productDo.productAmount}"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>


        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">结算推送</label>
                <div class="layui-input-inline">
                    <input type="text" class="layui-input" id="test5" name="settleTime" placeholder="HH:mm:ss" value="23:59:59">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" name="remark" th:value="${productDo.remark}"  placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" id="formSubmit" lay-submit="" lay-filter="demo1">立即提交</button>
            </div>
        </div>
    </form>

</div>


<script type="text/javascript">
    layui.use(['form','laydate'],function () {
        var form = layui.form
            , laydate = layui.laydate
        ;

        form.render();


        //日期时间选择器
        laydate.render({
            elem: '#test5'
            ,type: 'time'
        });
    })


</script>

</html>
